﻿// -----------------------------------------------------------------------
//    This file is part of TSGE.
//
//    TSGE is free software: you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation, either version 2 of the License, or
//    (at your option) any later version.
//
//    TSGE is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    You should have received a copy of the GNU General Public License
//    along with TSGE.  If not, see <http://www.gnu.org/licenses/>.
// -----------------------------------------------------------------------

namespace tsge
{
    using System.Windows;

    /// <summary>
    /// Interaction logic for App.xaml
    /// 
    ///     Inherits:
    ///         - Application
    /// </summary>
    public partial class App : Application
    {
        /// <summary>
        /// Unhandled exception dispatcher to prevent random application crashes.
        /// </summary>
        /// <param name="sender">Object that invoked this method.</param>
        /// <param name="e">Event arguments used for this method.</param>
        private void Application_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
        {
            MessageBox.Show(e.Exception.ToString(), "Unhandled Exception Was Caught");
        }
    }
}
